/*
 * AudioManager.h
 *
 *  Created on: 24 maj 2010
 *      Author: hule
 */

#ifndef AUDIOMANAGER_H_
#define AUDIOMANAGER_H_

#define _MSC_VER 1300
#include <conio.h>
#include <stdlib.h>
#include <al.h>
#include <alc.h>
//#include <alu.h>
#include <AL/alut.h>
#include <iostream>
#include <math.h>
#include <vector>
#include <stdio.h>
using namespace std;


// These index the buffers.
#define gun1     	0
#define WATERDROP   1
#define STREAM      2
#define RAIN        3
#define CHIMES      4
#define OCEAN       5
#define NUM_BUFFERS 1

class AudioManager {
public:
	AudioManager();
	void Addsound(string name);
	virtual ~AudioManager();
private:
	static ALuint Buffers[1];
	static vector<ALuint> Sources;
	static ALfloat SourcePos[3];
	static ALfloat SourceVel[3];
	static ALfloat ListenerPos[3];
	static ALfloat ListenerVel[3];
	static ALfloat ListenerOri[6];

	static ALboolean InitOpenAL();
	static void ExitOpenAL();
	static ALboolean LoadALData();
	static void AddSource(ALint type);
	static void SetListenerValues();
	static void KillALData();
};

#endif /* AUDIOMANAGER_H_ */
